const state = {
    result: {},
    article: {},
    firstType: []
}
const actions = {
    save_list: ({ commit }, payload) => {
        commit('SAVELIST', payload)
    },
    save_article: ({ commit }, payload) => {
        commit('SAVEARTICLE', payload)
    },
    remove_article: ({ commit }) => {
        commit('REMOVEARTICLE')
    },
    save_first: ({ commit }, payload) => {
        commit('SAVEFIRST', payload)
    }
}
const mutations = {
    SAVELIST: (state, payload) => {
        state.result = payload.result
    },
    SAVEARTICLE: (state, payload) => {
        state.article = payload
    },
    REMOVEARTICLE: state => state.article = '',
    SAVEFIRST: (state, payload) => state.firstType = payload.result
}

export default {
    state,
    actions,
    mutations
}